<template>
  <div class="fileQuery">
    <div class="fileQuery-table">
      <el-tabs type="card" v-model="activeName">
        <el-tab-pane label="基本信息" name="基本信息">
          <basic />
        </el-tab-pane>
        <el-tab-pane
          label="菜单信息"
          name="菜单信息"
          :disabled="type == '新增' ? true : false"
        >
          <menuMsg v-if="activeName=='菜单信息'"/>
        </el-tab-pane>
        <el-tab-pane
          label="角色信息"
          name="角色信息"
          :disabled="type == '新增' ? true : false"
        >
          <role v-if="activeName=='角色信息'"/>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>


<script>
import basic from "./basic";
import menuMsg from "./menu";
import role from "./role";
export default {
  components: {
    basic,
    menuMsg,
    role,
  },
  watch: {
    $route(to, from) {
      console.log(to.path);
      if (to.path == "/xmGlAdd") {
        this.type="新增"
        this.activeName="基本信息"
      }
      if (to.path == "/xmGlDetails") {
        this.type="详情"
      }
    },
  },
  data() {
    return {
      form: {
        archivesCode: "",
        archivesStatus: "",
        idNumber: "",
        physicalLocation: "",
        name: "",
      },
      activeName: "基本信息",
      type:localStorage.getItem('xmGlType'),
    };
  },
  mounted() {
   
  },
  methods: {},
};
</script>

<style  scoped>
.fileQuery {
  min-width: 1000px;
  width: 100%;
   margin: 16px;
  background-color: #fff;
}
.fileQuery-query {
  padding: 12px;
  border-bottom: 1px solid #e6e8ef;
}
.fileQuery-table {
  /* // padding: 12px; */
  width: 100%;
  padding: 12px 0 12px 12px;
}
.search .el-button {
  background-color: #4965d2;
  color: #fff;
  border-color: #4965d2;
}
.pagination {
  float: right;
  margin: 24px 0px;
}
/deep/ .el-tabs__item {
  font-size: 16px;
  font-weight: 600;
}
/deep/ .el-col-6 {
  height: 58px;
}

/deep/ .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item {
  background-color: #f5f7fa;
}
/deep/ .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  background-color: #fff;
  border-bottom: none !important;
}
/deep/ .el-tabs--card > .el-tabs__header .el-tabs__item {
  border-bottom: none;
}
/deep/ .el-tabs__nav-wrap {
  height: 42px;
  line-height: 40px;
}

/deep/ .el-collapse-item__arrow {
  margin-left: 10px;
  position: absolute;
  left: 0;
}
/deep/ .el-collapse-item__header {
  margin-left: 32px;
  font-size: 16px;
  color: #303133;
  font-weight: 600;
}
/deep/ .el-collapse {
  border: none;
}
/deep/.el-tabs__content{
  margin-right: 28px;
}
</style>
